package com.itheima.loop;

public class ForDemo1 {
    public static void main(String[] args) {
        // 目标:学习使用for循环
        // 需求：输出3次Hello World
        for (int i = 0; i < 3; i++) {
            System.out.println("Hello World");
        }

        System.out.println("-------------------------");
        for (int i = 0; i < 5; i++) {
            System.out.println("Hello World");
        }

        System.out.println("-------------------------");
        // 1 2 3 4
        for (int i = 1; i < 5; i++) {
            System.out.println("Hello World");
        }

        System.out.println("-------------------------");
        // 1 2 3 4 5
        for (int i = 1; i <= 5; i++) {
            System.out.println("Hello World");
        }
    }
}
